Release an extra reference on GtkExpander:child
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 24 Aug 2021 00:11:15 +0000 (01:11 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 24 Aug 2021 10:28:59 +0000 (11:28 +0100)
commit5e311d4d85d235a53191558a2337b534bf1a8a3a
treea86cb25c42671071f6a8881b8eb624e4b2b41321
parentb945033b4122f454487cfc3739cfa4ab973db378
Release an extra reference on GtkExpander:child

The child of a GtkExpander is owned directly by the expander whenever
the "expanded" flag is unset.

We are adding an additional reference to the child of an expander when
expander is not expanded.

Additionally, if a GtkExpander is disposed while not expanded, we need
to explicitly release the reference on the child widget that we own.

This reference leak was masked in GTK3 by GtkContainer removing each
child from the parent container by recursively calling
gtk_widget_destroy().
gtk/gtkexpander.c